package org.liuwei.concucrent.forkjoin;

import static org.junit.Assert.assertEquals;

import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.Future;

import org.junit.Test;

public class TestForkJoin {
	@Test  
	public void run() throws Exception{  
	    ForkJoinPool forkJoinPool = new ForkJoinPool();  
	    Future<Integer> result = forkJoinPool.submit(new Calculator(0, 10000));  
	    assertEquals(new Integer(49995000), result.get());  
	    
	    System.out.println(123456);
	}  
}

